package com.sdry.web.controller.lz;

import com.sdry.model.lz.DeviceBreakdown;
import com.sdry.service.lz.DeviceBreakdownService;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.annotation.Resource;
import javax.servlet.http.HttpSession;
import java.util.List;

/**
 * @ClassName DeviceMenuController
 * @Description 设备模块菜单跳转
 * @Author lz
 * @Date 2018年9月19日 11:12:35
 * @Version 1.0
 */
@Controller
@RequestMapping("/deviceMenu")
public class DeviceMenuController {

    @Resource
    DeviceBreakdownService deviceBreakdownService;

    /**
     * 进入设备信息页面
     * @return
     */
    @RequestMapping("/deviceInfo")
    public String enterDeviceInfoPage(){
        return "/lz/deviceInfo";
    }

    /**
     * 进入设备台帐页面
     * @return
     */
    @RequestMapping("/deviceAccount")
    public String deviceAccount(){
        return "/lz/deviceAccount";
    }

    /**
     * 进入设备档案页面
     * @return
     */
    @RequestMapping("/deviceFile")
    public String deviceFile(){
        return "/lz/deviceFile";
    }

    /**
     * 进入设备运行管理页面
     * @return
     */
    @RequestMapping("/deviceOperateManagement")
    public String operateManagement(){
        return "/lz/deviceOperateManagement";
    }

    /**
     * 进入维修维护计划页面
     * @return
     */
    @RequestMapping("/maintenancePlan")
    public String deviceAccidentReport(){
        return "/lz/maintenancePlan";
    }

    /**
     * 进入设备维修申请表登记页面
     * @return
     */
    @RequestMapping("/maintenanceResume")
    public String maintenanceResume(){
        return "/lz/maintenanceResume";
    }

    /**
     * 进入设备保养记录表登记页面
     * @return
     */
    @RequestMapping("/maintenanceResume2")
    public String maintenanceResume2(){
        return "/lz/maintenanceResume2";
    }

    /**
     * 进入设备保养记录表登记页面
     * @return
     */
    @RequestMapping("/maintenanceResume3")
    public String maintenanceResume3(){
        return "/lz/maintenanceResume3";
    }

    /**
     * 进入设备报警页面
     * @return
     */
    @RequestMapping("/deviceAlarm")
    public String maintenancePlan(){
        return "/WEB-INF/views/lz/deviceAlarm.jsp.bak";
    }

    /**
     * 进入备品备件页面
     * @return
     */
    @RequestMapping("/spareParts")
    public String spareParts(){
        return "/lz/spareParts";
    }


    /**
     * 进入设备巡检记录
     * @return
     */
    @RequestMapping("/deviceCheckForm")
    public String deviceCheckForm(){
        return "/lz/deviceCheckForm";
    }


    /**
     * 进入维修维护点检项管理
     * @return
     */
    @RequestMapping("/checkItem")
    public String checkItem(){
        return "/lz/checkItem";
    }
    
    /**
     * 进入设备故障维修单
     * @return
     */
    @RequestMapping("/deviceBreakdown")
    public String deviceBreakdown(){
        return "/lz/deviceBreakdown";
    }
    
    /*——————————————质检模块——————————————————*/
    
    /**
     * 进入工艺巡检登记
     * @return
     */
    @RequestMapping("/processInspection")
    public String processInspection(){
        return "/lz/processInspection";
    }
    
    /**
     * 进入工艺巡检记录历史
     * @return
     */
    @RequestMapping("/processInspectionList")
    public String processInspectionList(){
    	return "/lz/processInspectionList";
    }
    
    /**
     * 纺丝车间组件浇铸巡检项管理
     * @return
     */
    @RequestMapping("/processItem")
    public String processItem(){
    	return "/lz/processItem";
    }
    
    /**
     * 膜丝抽检
     * @return
     */
    @RequestMapping("/membraneFilaments")
    public String membraneFilaments(){
    	return "/lz/membraneFilaments";
    }

    /**
     * 新添模块:生产抽检
     * @return
     */
    @RequestMapping("/productInspect")
    public String productInspect(){
    	return "/lz/productInspect";
    }
    
    /**
     * 新添模块:留样管理
     * @return
     */
    @RequestMapping("/samplekeepMana")
    public String samplekeepMana(){
    	return "/lz/samplekeep";
    }

    /**
     * 新添模块:设备报修审批
     * @return
     */
    @RequestMapping("/deviceBreakdownApproval")
    public String deviceBreakdownApproval(HttpSession session){
        List<DeviceBreakdown> approvalList = deviceBreakdownService.queryAllBreakdownApproval();
        session.setAttribute("approvalList", approvalList);
        return "/lz/deviceBreakdownApproval";
    }
}
